package com.itany.shop.service;

import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.UserNotLoginException;
import com.itany.shop.vo.Cart;

/**
 * @author 黄衡熙
 * @version 1.0
 */
public interface CartService {
    /**
     * 加入购物车
     * @param cart
     * @param id
     * @param num
     */
    void addCart(Cart cart,String id,Integer num)throws UserNotLoginException, RequestParameterErrorException;
    /**
     * 删除指定商品
     * @param cart
     * @param id
     */
    void removeCart(Cart cart,String id)throws UserNotLoginException, RequestParameterErrorException;
    /**
     * 修改商品数量
     * @param cart
     * @param id
     * @param newNum
     */
    void updateCart(Cart cart,String id,Integer newNum)throws UserNotLoginException, RequestParameterErrorException;

}
